import { BaseService, Service, Permission } from "/@/core";

@Service({
	namespace: "gdshop/attachment",
})
class Attachment extends BaseService {
	@Permission("upload")
	upload(params: any) {
		return this.request({
			url: "/upload",
			method: "POST",
			params
		});
	}

	getBaseUrl(params: any) {
		return this.request({
			url: "/get_base_url",
			method: "GET",
			params: params
		});
	}
	@Permission("move")
	move(params: any) {
		return this.request({
			url: "/move",
			method: "POST",
			data: {
				...params
			}
		});
	}

	@Permission("edit")
	edit(params: any) {
		return Promise.reject("只做权限标识");
	}
}

export default Attachment;
